System and method for encoding and decoding large capacity 2-dimensional color bar code which can be color-corrected

ABSTRACT

Disclosed herein are a bar code encoding system and a bar code decoding system. The bar code encoding system includes a method for compressing the original data and adding data for error detection and correction to the compressed data to generate a large capacity 2-dimensional color bar code so as to be used as prints in an off-line environment and a large capacity 2-dimensional bar code pattern. The decoding system includes a method for receiving the prints including the 2-dimensional bar code generated by the encoding system through an input device such as a scanner and a camera, searching the 2-dimensional bar code to recognize it, performing color correction and error detection and correction, decompressing the compressed data to decode the original data.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application claims priority to Korean Patent Application No.10-2004-0027600, Apr. 21, 2004, which application is incorporated hereinfully by this reference.

TECHNICAL FIELD

The present invention relates to a system and method for encoding theoriginal data into a large capacity 2-dimensional color bar code thatcan be color-corrected in on/off-line environments, and a system andmethod for decoding the original data from the generated large capacity2-dimensional color bar code. More particularly, the invention relatesto a bar code encoding system including a method for compressing theoriginal data and adding data for error detection and correction to thecompressed data to generate a large capacity 2-dimensional color barcode so as to be used as prints in an off-line environment and a largecapacity 2-dimensional bar code pattern, and a decoding system includinga method for receiving the prints including the 2-dimensional bar codegenerated by the encoding system through an input device such as ascanner and a camera, searching the 2-dimensional bar code to recognizeit, performing color correction and error detection and correction,decompressing the compressed data to decode the original data.

BACKGROUND ART

A conventional one-dimensional bar code cannot store a large quantity ofdata. With the popularization of input/output devices such printers,scanners and digital cameras, studies on a 2-dimensional bar codecapable of storing larger amount of data than the one-dimensional barcode are being actively carried out. That is, attempts to improveefficiency and convenience in transmission and representation of datausing the 2-dimensional bar code are being made in various fields.

The 2-dimensional bar code used for the attempts should be generatedwithout having restrictions on its size and store a large quantity ofdata per unit area. Furthermore, the 2-dimensional bar code requiresshort recognition time and excellent decoding capability when decoded.The 2-dimensional bar code can be used only in a restricted field unlessthese conditions are satisfied.

FIGS. 1 a and 1 b illustrate 2-dimensional bar codes using Maxi codeamong conventional standard 2-dimensional bar codes. Referring to FIGS.1 a and 1 b, the Maxi code is composed of a central finder patternsurrounded by a tetragonal arrangement of hexagonal module offset rows.The finder pattern includes three black concentric circles, andinformation about direction can be known from six patterns (inside thecircles) composed of three modules at the corners of a hexagon. However,the Maxi code requires long recognition time because all the sixpatterns should be searched when patterns about direction are searched.

FIG. 1 c illustrates a 2-dimensional bar code using QR code among theconventional standard 2-dimensional bar codes. Referring to FIG. 1 c, afinder pattern of the QR code is composed of three identical positiondetection patterns respectively disposed at the left top, right top andleft bottom of a symbol. The QR code symbol has been encodedpreferentially such that probability that similar patterns come intocontact with the region outside the symbol is low, to enable rapidrecognition. Furthermore, recognition of the three position detectionpatterns constructing the finder pattern correctly defines the directionof the symbol position in the range of vision.

In the case of the QR code, however, all the three position detectionpatterns should be searched and, when any one of the position detectionpatterns is damaged, the position and direction of the symbol aredifficult to define.

The aforementioned conventional 2-dimensional bar codes have followingproblems. Firstly, the sizes of the conventional 2-dimensional bar codesshould be increased to store large capacity because capacity per unitarea is small, and a long period of bar code search time is requiredwhen the 2-dimensional bar codes are recognized. Furthermore, the sizesof the conventional 2-dimensional bar codes are fixed when generated ordifficult to set and thus they cannot be applied to various fields.Accordingly, it is difficult to realize large capacity data such as textdata, photograph data and audio data in the form of the conventional2-dimensional bar codes so that the conventional 2-dimensional bar codeshave been applied to only a specific field.

While there is a method of adding colors and gray to a conventionalblack-and-white 2-dimensional bar code to increase capacity, correctdecoding cannot be performed in this case because a difference betweenthe color of print and the original color is generated.

DISCLOSURE OF INVENTION Technical Problem

Accordingly, the present invention provides a system and method forencoding the original data into a large capacity 2-dimensional color barcode in on/off-line environments and a system and method for decodingthe generated large capacity 2-dimensional color barcode into theoriginal data.

Technical Solution

The present invention provides a bar code encoding system including amethod for compressing the original data and adding data for errordetection and correction to the compressed data to generate a largecapacity 2-dimensional color bar code so as to be used as prints in anoff-line environment and a large capacity 2-dimensional bar codepattern, and a decoding system including a method for receiving theprints including the 2-dimensional bar code generated by the encodingsystem through an input device such as a scanner and a camera, searchingthe 2-dimensional bar code to recognize it, performing color correctionand error detection and correction, decompressing the compressed data todecode the original data.

Advantageous Effects

The present invention can generate a 2-dimensional color bar codecapable of storing larger capacity per unit area than the conventional2-dimensional bar code and recognize the large capacity 2-dimensionalcolor bar code rapidly. Furthermore, the present invention can recognizethe large capacity 2-dimensional color bar code with highrecognizability even when a part of the bar code is damaged and the barcode is poorly colored, poorly printed or poorly scanned. Moreover, thepresent invention can improve capability of restoring the original datafrom the large capacity 2-dimensional color bar code and flexibly setthe size of the large capacity 2-dimensional color bar code when thecolor bar code is generated.

BRIEF DESCRIPTION OF THE DRAWINGS

Further objects and advantages of the invention can be more fullyunderstood from the following detailed description taken in conjunctionwith the accompanying drawings, in which:

FIG. 1 a illustrates the print of a 2-dimensional bar code using Maxicode among conventional standard 2-dimensional bar codes;

FIG. 1 b is a conceptual view of a 2-dimensional bar code using Maxicode among the conventional standard 2-dimensional bar codes;

FIG. 1 c illustrates a 2-dimensional bar code using QR code among theconventional standard 2-dimensional bar codes;

FIG. 2 is a block diagram of a 2-dimensional bar code image encodingsystem according to an embodiment of the present invention;

FIG. 3 is a flow chart showing the operation of the 2-dimensional barcode encoding system of FIG. 2;

FIGS. 4 a and 4 b are conceptual views showing a 2-dimensional bar codestart pattern and a 2-dimensional bar code search pattern according toan embodiment of the present invention;

FIG. 4 c is a table showing the relationship between the colors andbinary values of 2-dimensional bar code data patterns according to anembodiment of the present invention;

FIG. 4 d illustrates a color correction pattern according to anembodiment of the present invention;

FIG. 5 is a conceptual view showing position correcting markers of a2-dimensional bar code according to an embodiment of the presentinvention;

FIG. 6 is a conceptual view showing meta data of a 2-dimensional barcode according to an embodiment of the present invention;

FIGS. 7 a, 7 b and 7 c are conceptional views showing a process ofgenerating a code image of a 2-dimensional bar code including the barcode search pattern, position correcting markers and meta data;

FIG. 8 a is a block diagram of a 2-dimensional bar code image decodingsystem according to an embodiment of the present invention;

FIG. 8 b is a flow chart showing the operation of the 2-dimensional barcode image decoding system according to an embodiment of the presentinvention;

FIG. 9 is a flow chart showing the process of searching for a bar codesearch pattern shown in FIG. 8 a in more detail;

FIG. 10 a illustrates the concept of searching for a bar code searchpattern in an X-axis forward direction;

FIG. 10 b illustrates the concept of searching for a bar code searchpattern in an X-axis backward direction;

FIG. 10 c illustrates the concept of searching for a bar code searchpattern in an Y-axis forward direction;

FIG. 10 d illustrates the concept of searching for a bar code searchpattern in an Y-axis backward direction;

FIG. 11 is a flow chart showing the process of searching for cornerpoints of the bar code search pattern shown in FIG. 8 b in more detail;

FIG. 12 is a conceptual view showing the process of searching for thecorner points of the bar code search pattern in connection with anactual bar code image;

FIG. 13 is a flow chart showing the process of searching for positioncorrecting markers shown in FIG. 8 b in more detail;

FIG. 14 is a conceptual view showing the process of searching forposition correcting markers in connection with an actual bar code image;

FIG. 15 is a conceptual view showing a method for setting a searchsection SA(1,1) for searching for a marker Mrk(1,1) in connection withan actual bar code image;

FIG. 16 is a conceptual view showing a method for grasping bar codepixel positions using position correcting markers;

FIG. 17 illustrates the concept of storing larger quantity of data byvirtually extending position correcting markers according to anembodiment of the present invention;

FIG. 18 a illustrates an example of sampling a color correction patternaccording to an embodiment of the present invention; and

FIG. 18 b shows RGB values read from sampling points of FIG. 18 a.

BEST MODE FOR CARRYING OUT THE INVENTION

The present invention provides a method for encoding a large capacity2-dimensional color bar code that can be color-corrected, comprising thesteps of: forming a color correction pattern for correcting colors usedfor the 2-dimensional bar code; forming a 2-dimensional bar code startpattern for indicating the start point of the 2-dimensional bar code,the 2-dimensional bar code start pattern being composed of a pluralityof square pixels, the 2-dimensional bar code start pattern including aone-dimensional pattern in which black and white portions arealternately arranged; forming a 2-dimensional bar code search patternhaving black and white stripes having a specific width in a right-angledequilateral triangle having two 2-dimensional bar code start patternsincluding the one-dimensional pattern as two sides thereof, the lengthsof X-axis and Y-axis sides of the right-angled equilateral trianglebeing identical to each other; forming position correcting markers atthe end points of the X-axis and Y-axis sides of the 2-dimensional barcode search pattern and the intersection of lines respectively extendedfrom the end points, respectively, each position correcting marker beingin the form of square and having a predetermined number of pixels inhorizontal and vertical directions, each position correcting markerhaving a black central pixel and white pixels surrounding the blackcentral pixel; forming at least one meta data between the positioncorrecting markers, the meta data including a ratio of the height/widthof the 2-dimensional bar code to the quantity of additional data forerror correction, the meta data including additional data for correctingan error thereof; and converting the original data to be included in thebar code and additional data for error correction into color pixels.

The present invention also provides a system for encoding a largecapacity 2-dimensional color bar code that can be color-corrected,comprising: a pattern generator for generating a 2-dimensional bar codestart pattern for indicating the start point of the 2-dimensional barcode and a bar code search pattern having black and white stripes havinga specific width in a right-angled equilateral triangle having two2-dimensional bar code start patterns as two sides thereof, the2-dimensional bar code start pattern being composed of a plurality ofsquare pixels and including a one-dimensional pattern in which black andwhite portions are alternately arranged, the lengths of X-axis andY-axis sides of the right-angled equilateral triangle being identical toeach other; a position correcting marker generator for forming positioncorrecting markers at the end points of the X-axis and Y-axis sides ofthe 2-dimensional bar code search pattern and the intersection of linesrespectively extended from the end points, respectively, each positioncorrecting marker being in the form of square and having a predeterminednumber of pixels in horizontal and vertical directions, each positioncorrecting marker having a black central pixel and white pixelssurrounding the black central pixel; and a meta data generator forgenerating at least one meta data between the position correctingmarkers, the meta data including a ratio of the height/width of the2-dimensional bar code to the quantity of additional data for errorcorrection, the meta data including additional data for correcting anerror thereof.

The present invention also provides a method for decoding a largecapacity 2-dimensional color bar code that can be color-corrected,comprising: a first step of reading an encoded 2-dimensional bar codeimage and searching for a bar code search pattern to obtain thecoordinates and slope of a bar code start position on a memory; a secondstep of searching for corner points E1 and E2 of the searched bar codesearch pattern; a third step of searching for the coordinates ofposition correcting markers using the coordinates of the bar code searchpattern and the corner points of the bar code search pattern; and afourth step of reading the coordinates, data value and meta data of adata pattern of each section using the searched coordinates of theposition correcting markers.

The present invention also provides a system for decoding a largecapacity 2-dimensional color bar code that can be color-corrected,comprising: a bar code search pattern searching unit for receiving a2-dimensional bar code image and searching for a bar code search patternof the 2-dimensional bar code to obtain the coordinates and slope of thebar code start point; a bar code search pattern corner point searchingunit for obtaining corner points of the bar code search pattern usingthe searched coordinates of the bar code search pattern; a positioncorrecting marker searching unit for searching for the coordinates ofposition correcting markers using the coordinates of the bar code searchpattern and the corner points; and a data extracting unit for extractingdata with reference to the searched coordinates of the positioncorrecting markers.

In an aspect of the present invention, the right-angled two sides of the2-dimensional bar code search pattern each include a plurality of barcode start patterns.

In an aspect of the present invention, the 2-dimensional bar code searchpattern is located at the left top of the 2-dimensional bar code.

In an aspect of the present invention, each of the position correctingmarkers is formed in a tetragonal pattern for each recorded data block.

In an aspect of the present invention, the position correcting markersinclude virtual markers to process data pattern coordinates that do notbelong to any one of the corners of the 2-dimensional bar code when theposition correcting markers cover only a part of the bar code. Thevirtual markers are obtained by extending the position correctingmarkers at the corners of the bar code.

Mode for Invention

The present invention will now be described in detail in connection withpreferred embodiments with reference to the accompanying drawings. Forreference, like reference characters designate corresponding partsthroughout several views.

A system and method for encoding/decoding a 2-dimensional bar codeaccording to an embodiment of the present invention will now beexplained with reference to the attached drawings.

FIG. 2 is a block diagram of a 2-dimensional bar code image encodingsystem according to an embodiment of the present invention. Referring toFIG. 2, the 2-dimensional bar code image encoding system includes a datacompressing unit 201, a data adding unit 203, a meta data generator 205,a color correction pattern generator 206, a bar code search patterngenerator 207, a position correction marker generator 209, a2-dimensional bar code generator 211, and a printing unit 213.

The data compressing unit 201 compresses the original data using analgorithm employing Hoffman code to obtain data having capacity smallerthan the capacity of the original data. The data adding unit 203 addsadditional data for error detection/correction to the data compressed bythe data compressing unit 201.

The meta data generator 205 calculates the horizontal and verticallengths of a bar code in a minimum size that can fully represent data tobe encoded, and then generates meta data including a ratio of thehorizontal and vertical lengths of the bar code to the quantity of theadditional data. The meta data includes additional data for correctingan error in the meta data itself. That is, the meta data includes aversion, a format, additional data, information for errordetection/correction, and information about the width and height of a2-dimensional bar code.

The color correction pattern generator 206 sequentially generates allcolors used to generate the bar code in a rectangular pattern in aspecific region. The bar code search pattern generator 207 generates abar code search pattern and marks the bar code search pattern on aspecific region of the bar code. Here, the specific region correspondsto the left top of the bar code in the embodiment of the presentinvention.

The position correcting marker generator 209 generates positioncorrecting markers to be used to correct the position of the bar codeimage when the bar code image is decoded. Here, each of the positioncorrecting markers is generated for each data block and has a tetragonalpattern.

The 2-dimensional bar code generator 211 2-dimensionally barcodes theaforementioned contents, and the printing unit 213 prints the generated2-dimensional bar code.

FIG. 3 is a flow chart showing the operation of the 2-dimensional barcode encoding system of FIG. 2. Referring to FIG. 3, in the step S301,the original data is compressed using an algorithm employing Hoffmancode to obtain data having capacity smaller than the capacity of theoriginal data, and then the horizontal and vertical lengths of a barcode in a minimum size that can fully represent data to be encoded arecalculated.

In the step S303, the meta data including a ratio of the horizontal andvertical lengths of the bar code to the quantity of additional data isgenerated. The meta data includes additional data for correcting anerror thereof.

In the step S305, a bit map memory space where a bar code image to begenerated will be stored is allocated. In the step S307, the bar codesearch pattern is marked on the left top of the bar code.

In the step S306, a rectangular pattern composed of sequentiallyarranged colors used to generate the bar code is formed in a specificregion at the top of the bar code. Subsequently, position correctingmarkers are marked in the step S309, and then the meta data is marked onthe left top, left bottom, right top and right bottom portions of thebar code in a bar code image memory, respectively, in the step S311. Inthe step S313, the compressed original data and the additional data forerror correction are marked in the bar code image memory, to therebygenerate the 2-dimensional bar code.

FIGS. 4 a and 4 b are conceptual views showing a start pattern and asearch pattern of a 2-dimensional bar code according to an embodiment ofthe present invention. The start pattern shown in FIG. 4 a is includedin the search pattern shown in FIG. 4 b.

Referring to FIG. 4 a, the bar code start pattern according to anembodiment of the present invention is a one-dimensional pattern havingbright and dark portions that are alternately arranged to indicate thestart point of the bar code. In the embodiment of the present invention,the start pattern is composed of 22 pixels and a ratio of the lengths ofthe alternately arranged bright and dark portions is 8:2:4:2:2:2. Thisratio can be varied depending on a bar code designer.

Referring to FIG. 4 b, the bar code search pattern according to anembodiment of the present invention is a 2-dimensional pattern havingbright and dark portions alternately arranged. In the embodiment of thepresent invention, the bar code search pattern is 22 pixels in length,22 pixels in width and 22 pixels in thickness and is in the form ofright-angled triangle having lengths X and Y identical to each other.

The bar code search pattern in the form of right-angled triangle is a2-dimensionally extended pattern, as shown in FIG. 4 b. The bar codesearch pattern is used to obtain the coordinates of the left top of thebar code and rotation information of the bar code from an image scannedwhen the bar code is decoded.

In the right-angled triangle having the lengths X and Y identical toeach other, black and white stripes having a specific width arealternately formed. The bar code search pattern is formed as abovebecause it can be searched even when it is rotated by +90° whenunidirectional (X-axis, for example) search is performed.

FIG. 4 c is a table showing the relationship between the colors andbinary values of 2-dimensional bar code data patterns according to anembodiment of the present invention.

The original data is represented by 3-bit data in the bar code and the3-bit data is expressed by one of 8 colors shown in FIG. 4 c. The 8colors are obtained from combinations of the three primary colors, red,green and yellow. The value of each of the three primary colors can bevaried from 0 to 255 when the colors are combined, and one of 0 and 255is used when encoding is performed.

FIG. 4 d illustrates a color correction pattern according to anembodiment of the present invention. The color correction pattern isobtained by sequentially marking the colors of FIG. 4 c in a specificposition of the bar code.

The color correction pattern is used as reference data for determiningwhich one of the 8 colors used to generate the bar code corresponds tothe color of a bar code image obtained when bar code data is decoded inthe case where the color of the bar code image is not identical to thecolor used when the bar code is generated.

FIG. 5 is a conceptual view showing position correcting markers of a2-dimensional bar code according to an embodiment of the presentinvention. Each of the position correcting marker is in the form ofsquare that is 5 pixels in length and 5 pixels in width and has a blackpixel at the center point. The position correcting markers arerespectively marked on the end points M1 and M2 of the X and Y sides ofthe bar code search pattern marked in the form of right-angled triangleat the left top of the 2-dimensional bar code and the intersection M3 oflines respectively extended from the end points M1 and M2.

Position correcting markers are generated at points distant from thefirstly formed position correcting markers by a predetermined distancein X-axis and Y-axis directions. The position correcting markers formedat a regular interval will be explained in detail with reference to FIG.6. The position correcting markers are used to obtain bar code datapattern positions from an image scanned when bar code data patterns arerestored during a bar code image decoding process.

FIG. 6 illustrates a color correction pattern and meta data of a2-dimensional bar code according to an embodiment of the presentinvention. Referring to FIG. 6, the color correction pattern is composedof 8 colors used for the bar code. Each of the 8 colors is in a squarepattern. The 8 colors are sequentially repeated in the color correctionpattern. The color correction pattern is located at the top of the barcode.

The meta data includes a ratio of the height and width of the bar codeto the quantity of the additional data for error correction, asdescribed above. The meta data is marked four times all over the2-dimensional bar code in the embodiment of the present invention.

Firstly, the meta data is marked between a marker M1 and a marker M3 andbetween a marker M2 and the marker M3 in the 2-dimensional bar codepattern. Secondly, the meta data is marked between a right top markerand a marker left to the right top marker and between the right topmarker and a marker under the right top marker. Thirdly, the meta datais marked between a right bottom marker and a marker left to the rightbottom marker and between the right bottom marker and a marker above theright bottom marker. Fourthly, the meta data is marked between a leftbottom marker and a marker right to the left bottom marker and betweenthe left bottom marker and a marker above the left bottom marker. Thereason why identical four meta data are formed is that the bar code canbe restored if only one of the four meta data is scanned when theprinted bar code is damaged or noise is generated when the bar code isscanned.

While the four meta data are formed in the 2-dimensional bar code in theembodiment of the present invention, one, two or three meta data can beformed depending on a bar code designer.

FIGS. 7 a, 7 b and 7 c are conceptual views showing a process ofgenerating a code image of the 2-dimensional bar code including theaforementioned bar code search pattern, position correcting markers andmeta data. To generate the code image of the 2-dimensional bar code, thebar code search pattern is generated at the left top of the2-dimensional bar code first. Subsequently, the position correctingmarkers are generated at a regular interval, as described above, andthen the meta data is formed between the position correcting markers.

In this specification, Mrk(n,m) means a marker that is the nth on theX-axis and the mth on the Y-axis, and X and Y coordinates of Mrk(n,m)are MrkX(n,m) and MrkY(n, m).

FIG. 8 a is a block diagram of a 2-dimensional bar code image decodingsystem according to an embodiment of the present invention. Referring toFIG. 8 a, the 2-dimensional bar code image decoding system includes abar code image input unit 851, a bar code search pattern searching unit853, a bar code search pattern corner point searching unit 855, aposition correcting marker searching unit 857, a meta data extractingunit 859, a color correcting unit 860, a data extracting unit 861, anerror detecting/correcting unit 863, and a decompressing unit 865.

The bar code image input unit 851 samples a printed 2-dimensional barcode image using an input device such as a scanner and a camera, readsthe bar code image and stores the read bar code image in a bar codeimage memory.

The bar code search pattern searching unit 853 searches the bar codeimage memory for the bar code search pattern of the bar code to detectthe coordinates and slope of a bar code start point on the memory.

The bar code search pattern corner point searching unit 855 obtains thecoordinates of corner points E1 and E2 of the bar code search patternusing the coordinates of the bar code searching pattern detected fromthe bar code image memory.

The position correcting marker searching unit 857 searches for thecoordinates of the position correcting markers using the coordinates ofthe bar code search pattern and the corner points E1 and E2.

There are multiple position correcting markers in the 2-dimensional barcode. Accordingly, the first position correcting marker is searchedstarting from the intersection of vertical and horizontal sides of the2-dimensional bar code pattern, and then the next position correctingmarker is searched using the searched first marker.

The meta data extracting unit 859 extracts the meta data with referenceto the coordinates of the searched position correcting markers. Thecolor correcting unit 860 reads the 8 colors of the color correctionpattern, selects colors the most similar to the colors of data blockpatterns of the bar code from the 8 colors of the color correctionpattern, and converts the colors of the data block patterns into theselected colors.

The data extracting unit 861 extracts the compressed original dataincluding the additional data for error detection/correction from thedata block patterns.

The error detecting/correcting unit 863 performs errordetection/correction with reference to the additional data for errordetection/correction.

The decompressing unit 865 decompresses the original data compressed inthe encoding process to decode the original data.

FIG. 8 b is a flow chart showing the operation of the 2-dimensional barcode image decoding system according to an embodiment of the presentinvention. Referring to FIG. 8 b, a bar code image to be decoded is readin the step S801. Here, the bar code image is read using a scanner or acamera, and the printed bar code image is sampled and read to the barcode image memory.

Then, the bar code search pattern of the bar code is searched in thestep S803. Here, the bar code image memory is searched for the bar codesearch pattern of the bar code to find out the coordinates and slope ofthe bar code start point on the memory.

Subsequently, corner points of the bar code search pattern are searchedin the step S805. Here, the coordinates of the corner points E1 and E2of the bar code search pattern are obtained using the coordinates of thebar code search pattern found in the bar code image memory.

The coordinates of the position correcting markers are searched in thestep S807. Here, the coordinates of the first position correcting markerare searched using the coordinates of the searched bar code searchpattern and the corner points E1 and E2 and the next marker is foundusing the searched marker.

In the step S808, the 8 colors of the color correction pattern are readand colors the most similar to the colors of data block patterns of thebar code are selected from the 8 colors of the color correction pattern.Then, the colors of the data block patterns are converted into theselected colors. In the step S809, the coordinates and data values ofthe data patterns are read using the position correcting markers, andthe process is finished. Here, the meta data is extracted.

FIG. 9 is a flow chart showing the process of searching for the bar codesearch pattern shown in FIG. 8 a in more detail. FIG. 10 a is aconceptual view showing a process of searching for the bar code searchpattern in an X-axis forward direction, and FIG. 10 b is a conceptualview showing a process of searching for the bar code search pattern inan X-axis backward direction. In addition, FIG. 10 c is a conceptualview showing a process of searching for the bar code search pattern inan Y-axis forward direction, and FIG. 10 d is a conceptual view showinga process of searching for the bar code search pattern in an Y-axisbackward direction.

In the steps S901 through S905, SY that represents a row in the Y-axisdirection is initialized and a step for repeated search is taken. In thestep S907, it is determined whether the bar code search pattern is foundin the X-axis forward direction from the SYth row of an image memory.Here, searching for the bar code search pattern in the X-axis forwarddirection is carried out by determining whether a ratio of the lengthsof alternately arranged black and white portions of the bar code searchpattern corresponds to a predetermined bar code start pattern.

In the embodiment of the present invention, the start point of a patternin which a ratio of the lengths of black and white portions is8:2:4:2:2:2:2 is set as the start point of the bar code search pattern(referring to FIG. 4 a). FIG. 10 a shows the process of searching forthe bar code search pattern in the X-axis forward direction inconnection with an actual bar code image. Referring to FIG. 10 a, when apattern in which{L_(AB)}:{L_(BC)}:{L_(CD)}:{L_(DE)}:{L_(EF)}:{L_(FG)}:{L_(GH)}=8:2:4:2:2:2:2is found, the start point of this pattern is set as the start point ofthe bar code search pattern.

When the bar code search pattern is not found in the X-axis forwarddirection in the step S907, it is determined whether the bar code searchpattern is found in the X-axis backward direction from the SYth row ofthe image memory in the step S909. Here, searching for the bar codesearch pattern in the X-axis backward direction is carried out bydetermining whether the ratio of the lengths of alternately arrangedblack and white portions of the bar code search pattern corresponds tothe predetermined bar code start pattern.

In the embodiment of the present invention, the start point of thepattern in which the ratio of the lengths of the black and whiteportions is 8:2:4:2:2:2:2 is set as the start point of the bar codesearch pattern (referring to FIG. 4 a). FIG. 10 b shows the process ofsearching for the bar code search pattern in the X-axis backwarddirection in connection with an actual bar code image. Referring to FIG.10 b, when a pattern in which{L_(AB)}:{L_(BC)}:{L_(CD)}:{L_(DE)}:{L_(EF)}:{L_(FG)}:{L_(GH)}=2:2:2:2:4:2:8is found, the start point of this pattern is set as the start point ofthe bar code search pattern.

When the bar code search pattern is not found in the X-axis backwarddirection in the step S909, it is determined whether the row in theY-axis direction is larger than the Y size of the bar code image. Whenthe Y-axis row is not larger than the Y size of the bar code image, theprocess returns to the step S905. When the Y-axis row is larger than theY size of the bar code image, SX that represents a row in the X-axisdirection is initialized in the steps S913 and S915 and a step forrepeated search is taken. In the step S917, it is determined whether thebar code search pattern is found in the Y-axis forward direction fromthe SXth row of the image memory. Here, searching for the bar codesearch pattern in the Y-axis forward direction is carried out bydetermining whether the ratio of the lengths of the alternately arrangedblack and white portions of the bar code search pattern corresponds tothe predetermined bar code start pattern.

In the embodiment of the present invention, the start point of thepattern in which the ratio of the lengths of black and white portions is8:2:4:2:2:2:2 is set as the start point of the bar code search pattern(referring to FIG. 4 a). FIG. 10 c shows the process of searching forthe bar code search pattern in the Y-axis forward direction inconnection with an actual bar code image. Referring to FIG. 10 c, when apattern in which{L_(AB)}:{L_(BC)}:{L_(CD)}:{L_(DE)}:{L_(EF)}:{L_(FG)}:{L_(GH)}=8:2:4:2:2:2:2is found, the start point of this pattern is set as the start point ofthe bar code search pattern.

When the bar code search pattern is not found in the Y-axis forwarddirection in the step S917, it is determined whether the bar code searchpattern is found in the Y-axis backward direction from the SXth row ofthe image memory in the step S919. Here, searching for the bar codesearch pattern in the Y-axis backward direction is carried out bydetermining whether the ratio of the lengths of the black and whiteportions of the bar code search pattern corresponds to the predeterminedbar code start pattern.

In the embodiment of the present invention, the start point of thepattern in which the ratio of the lengths of the black and whiteportions is 2:2:2:2:4:2:8 is set as the start point of the bar codesearch pattern (referring to FIG. 4 a). FIG. 10 d shows the process ofsearching for the bar code search pattern in the Y-axis backwarddirection in connection with an actual bar code image. Referring to FIG.10 d, when a pattern in which{L_(AB)}:{L_(BC)}:{L_(CD)}:{L_(DE)}:{L_(EF)}:{L_(FG)}:{L_(GH)}=2:2:2:2:4:2:8is found, the start point of this pattern is set as the start point ofthe bar code search pattern.

When the bar code search pattern is not found in the Y-axis backwarddirection in the step S919, it is determined whether the row in theX-axis direction is larger than the X size of the bar code image. Whenthe X-axis row is not larger than the X size of the bar code image, theprocess returns to the step S915. When the X-axis row is larger than theX size of the bar code image, the process is finished.

FIG. 11 is a flow chart showing the process of searching for the cornerpoints of the bar code search pattern shown in FIG. 8 b in more detail,and FIG. 12 is a conceptual view showing the process of searching forthe corner points of the bar code search pattern in connection with anactual bar code image.

In FIG. 12, P1 represents the start point of the searched bar codesearch pattern (X and Y coordinates of P1 are P1 x and P1 y), P2 denotesthe end point of the searched bar code search pattern (X and Ycoordinates of P2 are P2 x and P2 y), P3 represents the intersection ofa straight line S2 and a half-circle A1 used to search for the cornerpoints of the bar code start pattern, and P4 denotes the intersection ofa straight line S4 and the half-circle A1. In addition, L1 is the lengthof the searched bar code start pattern, L2 is the radius of thehalf-circuit A1, E1 represents the first corner point (X and Ycoordinates of E1 are E1 x and E1 y) of the bar code search pattern, andE2 denotes the second corner point (X and Y coordinates of E2 are E2 xand E2 y) of the bar code search pattern. Furthermore, S1 is a linepassing through P1 and P2, S2 and S4 are lines used to search for thecorner points of the bar code start pattern, and S3 is a line passingthrough P1 and E1. Moreover, S5 is a line passing through P1 and E2, T1is an angle between S1 and S2, and T2 is an angle between S1 and S4.

Referring to FIGS. 11 and 12, the angle T1 between the line S1 passingthrough the start point and the end point of the searched bar codesearch pattern and the line S2 for searching for the bar code cornerpoints is initialized in the step S1101. Here, the unit of T1 is adegree (°). It is determined whether the bar code start pattern is foundbetween P1 and P3 in the step S1103 and, when the start pattern isfound, the end point of the found start pattern is set to E1 in the stepS1105 and T1 is gradually increased in the step S1107.

That is, search is continuously carried out while increasing the angleT1. While the angle T1 is increased 2° by 2° in the embodiment of thepresent invention, the increase can be varied depending on a designer.

It is determined whether the increased angle exceeds 90° in the stepS1109 and, when it does not, the process returns to the step S1103. Whenthe increased angle exceeds 90°, the angle T2 is initialized to 0 in thestep S1111.

It is determined whether the start pattern is found between P1 and P2 inthe step S1113 and, when the start pattern is found, the end point ofthe found start pattern is set to E1 in the step S1115 and the angle T2is gradually decreased in the step S1117. That is, search is continuedwhile decreasing the angle T2. While the angle T2 is reduced 2° by 2° inthe embodiment of the present invention, the decrease can be varieddepending on a designer.

It is determined whether the decreased angle is smaller than 90° in thestep S1119 and, when it is, the process is finished. Accordingly, thecorner points E1 and E2 of the bar code search pattern can be obtained.When the decreased angle is not smaller than 90°, the process returns tothe step S1113.

FIG. 13 is a flow chart showing the process of searching for theposition correcting markers shown in FIG. 8 b in more detail, and FIG.14 is a conceptual view showing the process of searching for theposition correcting markers in connection with an actual bar code image.FIG. 15 is a conceptual view showing a method for setting a searchsection SA(1,1) for searching for a marker Mrk(1,1) in connection withan actual bar code image.

In FIGS. 13, 14 and 15, DW represents the distance between the searchedfirst corner point E1 and the start point P1 of the bar code searchpattern (the distance in the X-axis direction between E1 and P1 is DWxand the distance in the Y-axis direction between E1 and P1 is DWy), andDH denotes the distance between the searched second corner point E2 andthe start point P1 of the bar code search pattern (the distance in theX-axis direction between E2 and P1 is DHx and the distance in the Y-axisdirection between E2 and P1 is DHy). In addition, SA(1,0) represents amarker search section for searching for a marker Mrk(1,0) and is arectangular form perpendicular to a line S3. The length of two parallelsides of SA(1,0) is determined in proportion to the distance DH betweenP1 and E2, as shown in FIG. 14. Furthermore, SA(0,1) denotes a markersearch section for searching for a marker Mrk(0,1) and is a rectangularform perpendicular to a line S5. The length of two parallel sides ofSA(0,1) is determined in proportion to the distance DH between P1 andE2, as shown in FIG. 14.

Referring to FIGS. 13, 14 and 15, the corner points of the bar codesearch pattern are searched in the step S1301. Then, the positioncorrecting marker Mrk(1,0) and the search sections SA(1,0) and S(0,1) ofthe marker Mrk(1,0) are set using P1, E1 and E2, as shown in FIG. 14, inthe step S1303.

As described above, SA(1,0) is a rectangular form perpendicular to theline S3 and the length of horizontal two sides of SA(1,0) is determinedin proportion to the distance DW between P1 and E1. In the embodiment ofthe present invention, the length of the horizontal two sides of SA(1,0)corresponds to DW*(the number of horizontal pixels of the marker)/(thenumber of pixels of the bar code start pattern), that is, DW*5/22(referring to FIGS. 4 a and 4 b).

The length of vertical two sides of SA(1,0) corresponds to DW*(thenumber of vertical pixels of the marker+the number of pixels in thethickness direction of the bar code start pattern)/(the number of pixelsof the bar code start pattern), that is, DW*7/22.

In the step S1307, it is determined whether both the position correctingmarkers Mrk(1,0) and Mrk(0,1) are found. When they are found, theposition of a marker Mrk(0,0) is set in the step S1307. Here, a positioncorrecting marker is found in such a manner that a pixel whoseneighboring pixels have a value higher than the value of the entireimage is found from points having values lower than the mean value ofthe image and the coordinates of the pixel are set as the coordinates ofthe position correcting marker.

The coordinates of Mrk(0,0) are set as follows.Mrk(0,0)=MrkX(1,0)−DWxMrkY(0,0)=MrkY(1,0)−DWy

In the step S1309, SA(1,1) for searching for Mrk(1,1) is set.Specifically, as shown in FIG. 15, a square having a center pointdistant from Mrk(0,1) by DWx in the X-axis direction and DWy in theY-axis direction, four sides each have a length of DW*5/22 and a slopecorresponding to S3 is set as SA(1,1).

In the step S1311, it is determined whether the position correctingmarker Mrk(1,1) is found in the search section SA(1,1). When it isfound, IX that represents a row in the X-axis direction is initializedto 1 in the step S1313, and then search sections SA(IX+1,0) andSA(IX+1,1) are set from markers Mrk(IX,0) and Mrk(IX,1).

Specifically, a square having a center point distant from Mrk(IX,0) byDWx in the X-axis direction and DWy in the Y-axis direction, four sideseach have a length of DW*5/22 and a slope corresponding to S3 is set asSA(IX+1,0). A square having a center point distant from Mrk(IX,1) by DWxin the X-axis direction and DWy in the Y-axis direction, four sides eachhave a length of DW*5/22 and a slope corresponding to S3 is set asSA(IX+1,1).

In the step S1317, it is determined whether both the position correctingmarkers Mrk(IX+1,0) and Mrk(IX+1,1) are found in the search sectionsSA(IX+1,0) and SA(IX+1,1). When they are found, 1 is added to IX, andthen the process returns to the step S1315. When they are not found, IYthat represents a column in the Y-axis direction is initialized to 1 inthe step S1321.

In the step S1323, search sections SA(0,IY+1) through SA(IX+1,IY+1) areset from markers Mrk(0,IY) through Mrk(IX+1,IY). That is, a squarehaving a center point distant from Mrk(n,m) by DHx in the X-axisdirection and DHy in the Y-axis direction, four sides each have a lengthof DW*5/22 and a slope corresponding to S3 is set as SA(n,m+1,).

In the step S1325, it is determined whether all the position correctingmarkers Mrk(0,IY+1) through Mrk(IX+1,IY+1) are found in the set searchsections. When they are found, 1 is added to IY and the process returnsto the step S1323.

FIG. 16 is a conceptual view showing a method of grasping bar code pixelpositions using the position correcting markers. Referring to FIG. 16,the position correcting markers are searched through the above-describedprocess, and then the positions of points around four corner points ofeach search section are estimated.

FIG. 17 illustrates the concept of storing larger quantity of data byvirtually extending the position correcting markers according to anembodiment of the present invention.

When the 2-dimensional bar code size is determined, normalized markersmay not cover the entire 2-dimensional bar code but only a part of it.In this case, a virtual marker is needed to record data in parts of thebar code, which are not covered by the markers. Furthermore, markers atthe corners of the bar code can be extended in order to process datapattern coordinates that do not belong to any one of the corners of thebar code.

FIG. 18 a is a conceptual view showing a process of correcting the colorof a bar code according to an embodiment of the present invention.Referring to FIG. 18 a, RGB values are read from sampling points SP₁₁₁,SP₁₀₀, SP₀₁₀, SP₀₀₀, SP₀₁₁, SP₁₀₁, SP₁₁₀ and SP₀₀₀, of the colorcorrection pattern.

FIG. 18 b is a color correction table showing the RGB values read fromthe sampling points of FIG. 18 a. Referring to FIG. 18 b, the RGB valueshave a minimum value of 0 and a maximum value 255.

When a bar code is decoded, the RGB value of a data pattern to bedecoded is read and a binary value corresponding to a sampling value ofthe color correction table, which is the most similar to the RGB value,is determined as a color correction result.

The RGB value of a sampling point DP₁ for decoding the data pattern is(96, 241, 91). This RGB value is the most similar to the RGB value ofSP₁₀₁ of the color correction table, and thus the binary value of DP₁ isset to 010.

When the RGB value of the color correction table is compared to the RGBvalue of the data pattern, the color having the highest correlation isselected using generally used correlation measurement of RGB value. Thebinary value obtained through the color correction process is used asthe original data and additional data in the data extracting unit.

While the present invention has been described with reference to theparticular illustrative embodiments, it is not to be restricted by theembodiments but only by the appended claims. It is to be appreciatedthat those skilled in the art can change or modify the embodimentswithout departing from the scope and spirit of the present invention.

1. A method for encoding a large capacity 2-dimensional color bar codethat can be color-corrected, comprising the steps of: forming a colorcorrection pattern used for correcting the colors of the 2-dimensionalbar code, the color correction pattern having all colors used for the2-dimensional bar code and being located in a specific region of the barcode; forming a 2-dimensional bar code start pattern for indicating astart point of the 2-dimensional bar code, the 2-dimensional bar codestart pattern being composed of a plurality of square pixels, the2-dimensional bar code start pattern including a one-dimensional patternin which black and white portions are alternately arranged; forming a2-dimensional bar code search pattern having black and white stripeshaving a specific width in a right-angled equilateral triangle havingtwo 2-dimensional bar code start patterns including the one-dimensionalpattern as two sides thereof, lengths of X-axis and Y-axis sides of theright-angled equilateral triangle being identical to each other; formingposition correcting markers at end points of the X-axis and Y-axis sidesof the 2-dimensional bar code search pattern and an intersection oflines respectively extended from the end points, respectively, eachposition correcting marker being in the form of square and having apredetermined number of pixels in horizontal and vertical directions,each position correcting marker having a black central pixel and whitepixels surrounding the black central pixel; and forming at least onemeta data between the position correcting markers, the meta dataincluding a ratio of height/width of the 2-dimensional bar code to aquantity of additional data for error correction, the meta dataincluding additional data for correcting an error thereof.
 2. Theencoding method of claim 1, wherein the colors used for the2-dimensional bar code, each of which is in a square pattern, arearranged at the top of the 2-dimensional bar code search pattern.
 3. Theencoding method of claim 1, wherein the right-angled two sides of the2-dimensional bar code search pattern each include a plurality of barcode start patterns.
 4. The encoding method of claim 1, wherein the2-dimensional bar code search pattern is located at the left top of the2-dimensional bar code.
 5. The encoding method of claim 1, wherein eachof the position correcting markers is formed in a tetragonal pattern foreach recorded data block.
 6. The encoding method of claim 1, furthercomprising a step of forming virtual markers outside the 2-dimensionalbar code to process data pattern coordinates that do not belong to anyone of the corners of the 2-dimensional bar code when the positioncorrecting markers cover only a part of the bar code, the virtualmarkers being obtained by extending position correcting markers disposedat the corners of the 2-dimensional bar code.
 7. A system for encoding alarge capacity 2-dimensional color bar code that can be color-corrected,comprising: a pattern generator for generating a 2-dimensional bar codestart pattern for indicating a start point of the 2-dimensional bar codeand a bar code search pattern having black and white stripes having aspecific width in a right-angled equilateral triangle having two2-dimensional bar code start patterns as two sides thereof, the2-dimensional bar code start pattern being composed of a plurality ofsquare pixels and including a one-dimensional pattern in which black andwhite portions are alternately arranged, lengths of X-axis and Y-axissides of the right-angled equilateral triangle being identical to eachother; a position correcting marker generator for forming positioncorrecting markers at end points of the X-axis and Y-axis sides of the2-dimensional bar code search pattern and an intersection of linesrespectively extended from the end points, respectively, each positioncorrecting marker being in the form of square and having a predeterminednumber of pixels in horizontal and vertical directions, each positioncorrecting marker having a black central pixel and white pixelssurrounding the black central pixel; and a meta data generator forgenerating at least one meta data between the position correctingmarkers, the meta data including a ratio of a height/width of the2-dimensional bar code to a quantity of additional data for errorcorrection, the meta data including additional data for correcting anerror thereof.
 8. The encoding system of claim 7, further comprising: adata compressing unit for receiving the original data and compressingthe received original data using an algorithm employing Hoffman code;and a data adding unit for adding additional data for errordetection/correction to the compressed data.
 9. The encoding system ofclaim 7, wherein the position correcting marker generator forms virtualmarkers outside the 2-dimensional bar code to process data patterncoordinates that do not belong to any one of the corners of the2-dimensional bar code when the position correcting markers cover only apart of the bar code, the virtual markers being obtained by extendingposition correcting markers disposed at the corners of the 2-dimensionalbar code.